package org.lex.keytool.core.service;

import java.util.Map;
import java.util.TreeMap;

public class KeyTools {
	// private static final String KeyPairGenerator = "KeyPairGenerator";
	// private static final String KeyStore = "KeyStore";

	private static Map<String, String> printFormats;
	static {
		printFormats = new TreeMap<String, String>();
		printFormats.put("Default", "");
		printFormats.put("Human Readable", "-v");
		printFormats.put("RFC 1421", "-rfc");
	}

	public static String[] getSupportKeyAlgorithms() {
		return new String[] { "RSA", "DSA" };
	}

	public static String[] getSupportKeyStoreTypes() {
		return new String[] { "jks", "pkcs12" };
	}

	public static String[] getSupportSignAlgorithms() {
		return new String[] { "MD5withRSA", "SHA1withDSA", "SHA1withRSA", "SHA256withRSA" };
	}

	public static String[] getSupportPrintFormats() {
		return printFormats.keySet().toArray(new String[0]);
	}
}
